package com.chen.service.serviceimpl;

import com.chen.dao.BuildingDao;
import com.chen.pojo.Building;
import com.chen.pojo.Teacher;
import com.chen.service.BuildingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BuildingServiceImpl implements BuildingService {
    @Autowired
    private BuildingDao buildingDao;

    @Override
    public List<Building> getBuildingList(Building building) {
        return buildingDao.getBuildingList(building);
    }
    @Override
    public Building getBuildingById(Integer id) {
        return buildingDao.getBuildingById(id);
    }

    @Override
    public void updateBuilding(Building building) {
            buildingDao.updateBuilding(building);
    }

    @Override
    public List<Teacher> getTeacherByBuilding(int id) {
        return buildingDao.getTeacherByBuilding(id);
    }

    @Override
    public List<Teacher> getNotTeacherByBuilding(int id) {
        return buildingDao.getNotTeacherByBuilding(id);
    }

    @Override
    public List<Building> getBuildingByTeacherId(int teacherId) {
        return buildingDao.getBuildingByTeacherId(teacherId);
    }
}
